package com.wangjialu.learner.payment.service.impl;

import com.wangjialu.learner.payment.dao.PaymentDao;
import com.wangjialu.learner.payment.entities.Payment;
import com.wangjialu.learner.payment.service.PaymentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p></p>
 *
 * @author WangJialu
 * @since 2021/6/22 4:41
 */
@Service
public class PaymentServiceImpl implements PaymentService {
    @Resource
    private PaymentDao paymentDao;

    @Override
    public Payment queryById(Long id) {
        return paymentDao.queryById(id);
    }

    @Override
    public List<Payment> queryAllByLimit(Integer offset, Integer limit) {
        return paymentDao.queryAllByLimit(offset, limit);
    }

    @Override
    public List<Payment> queryAll(Payment payment) {
        return paymentDao.queryAll(payment);
    }

    @Override
    public int insert(Payment payment) {
        return paymentDao.insert(payment);
    }

    @Override
    public int update(Payment payment) {
        return paymentDao.update(payment);
    }

    @Override
    public int deleteById(Long id) {
        return paymentDao.deleteById(id);
    }
}
